package org.wlgzs.shop.manager;

/**
 * @Author: Ben
 * @Date: 2019/5/22 23:46
 * @Project org.wlgzs.shop
 */
//抽取出来的参数【代码拷贝下来只需要修改成自己的CLIENT_ID，Client CLIENT_SECRET，CALLBACK即可】
 public class GitHubConstants {
    public static final String CLIENT_ID = "a0cb46d914908fd2bc9e"; // TODO 修改成自己的
    public static final String CLIENT_SECRET = "ff590820cfec1664711df03a32264b9f90627cf6";  // TODO 修改成自己的
    public static final String CALLBACK = "http://localhost:8080/callback";  // TODO 修改成自己的  [注意：callback要和注册的回调路径保持一致  否则登录授权之后会报NullPointerException]

    //获取code的url
    public static final String CODE_URL = "https://github.com/login/oauth/authorize?client_id=CLIENT_ID&state=STATE&redirect_uri=CALLBACK";
    //获取token的url
    public static final String TOKEN_URL = "https://github.com/login/oauth/access_token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=CODE&redirect_uri=CALLBACK";
    //获取用户信息的url
    public static final String USER_INFO_URL = "https://api.github.com/user?access_token=TOKEN";
}
